#ifndef __COMMON_H_INCLUDED__
#define __COMMON_H_INCLUDED__

// c lib
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

// base
#define BUF_SIZ (1024)

#define Z_MEM(BUF, SIZ) memset(BUF, 0, SIZ)

#define DEBUG
//#undef DEBUGDEBUG

// android log
#ifdef DEBUG
#include <android/log.h>
#define TAG "XPlugin"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG ,__VA_ARGS__);
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__);
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG ,__VA_ARGS__);
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG ,__VA_ARGS__);
#define LOGF(...) __android_log_print(ANDROID_LOG_FATAL,TAG ,__VA_ARGS__);
#else
#define LOGD(...)
#define LOGI(...)
#define LOGW(...)
#define LOGE(...)
#define LOGF(...)
#endif

#endif //__COMMON_H_INCLUDED__